package com.zhuss.core.db.dao.ext;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.bean.bo.core.user.DeleteUserRoleBo;
import com.zhuss.core.db.dao.gen.UserRoleMapper;
import com.zhuss.core.db.entity.UserRole;

@Mapper
public interface UserRoleDao extends UserRoleMapper {
	
	List<Long> listRoleId(@Param("userId") Long userId);

	List<UserRole> listUser(@Param("roleId") Long roleId);
	
	List<UserRole> listUserIdByRoleList(@Param("roleIdList") List<Long> roleIdList);
	
	void create(UserRole record);

	void deleteByUserRole(@Param("bo") DeleteUserRoleBo bo, @Param("userId") Long userId, @Param("roleIdList") List<Long> roleIdList);
	
	void deleteByRoleUser(@Param("bo") DeleteUserRoleBo bo, @Param("roleId") Long roleId, @Param("userIdList") List<Long> userIdList);
    
    
}